

<script type="text/javascript">
function checkform()
  {
	 
	var content= document.getElementById('content');
	var author= document.getElementById('author');
	var summany= document.getElementById('summany');
	var image= document.getElementById('image');
	 var title= document.getElementById('title');
	

	
	if(title.value=='') 
	 {
	 alert('Tieu de  cho san pham');
		 title.focus();
		 return false;
	 }
	  if(summany.value=='') 
	 {
		 alert('nhập tóm tắt');
		 summany.focus();
		 return false;
	 }
	  if(image.value=='') 
	 {
		 alert('Chưa có hình cho tin tức');
		 image.focus();
		 return false;
	 }
	 if(content.value.length < 6) 
	 {
		 alert('NỘI DUNG BÀI VIẾT QUÁ NGẮN');
		 content.focus();
		 return false;
	 }
	  
	  if(author.value=='') 
	 {
		 alert('BẠN CHƯA NHẬP NGƯỜI ĐĂNG');
		 author.focus();
		 return false;
	 }

	
	 
}



</script>
</head>
<center>

<div id="table">
<form action="index.php?option=thongbao&amp;cat=xuly" method="post" enctype="multipart/form-data" name="form1">
 <table width="100%" border="1" cellspacing="5" cellpadding="5">
 
   <tr bgcolor="#666666">
      <td colspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><strong><h1>Thêm Thông Báo</h1></strong></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Tiêu đề</td>
      <td align="left" valign="middle"><label for="title"></label>
      <input name="title" type="text" id="title" size="70"></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Tóm tắt</td>
      <td align="left" valign="middle"><label for="summany"></label>
      <input name="summany" type="text" id="summany" size="70"></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Nội dung</td>
      <td align="left" valign="middle"><label for="content"></label>
      <textarea name="content" id="content" class="ckeditor" cols="50" rows="5" ></textarea></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Hình ảnh</td>
      <td align="left" valign="middle"><label for="image"></label>
      <input type="file" name="image" id="image"></td>
    </tr>
	<tr >
      <td width="70" align="center" valign="middle">File kèm Theo</td>
      <td align="left" valign="middle"><label for="linkfile"></label>
      <input type="file" name="linkfile" id="linkfile"></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Người đăng</td>
      <td align="left" valign="middle"><label for="author"></label>
      <input type="text" name="author" id="author"></td>
    </tr>
    <tr >
      <td width="70" align="center" valign="middle">Trạng thái</td>
      <td align="left" valign="middle"><label for="states"></label>
        <select name="states" id="states">
          <option value="0">Ẩn</option>
          <option value="1">Hiện</option>
      </select></td>
    </tr>
  <tr>
   <td width="70"  align="center" align="right" valign="middle">&nbsp;</td>
    <td >
	
      <label><input type="submit" name="DANG" value="Gửi" onclick="return checkform()" /></label>
      <label> <input type="submit" name="Submit2" value="Huỷ thông tin đã nhập" /></label>
    </td>
  </tr>
</table></div></center>
</form>


